<%--
  Created by IntelliJ IDEA.
  User: root
  Date: 11/18/24
  Time: 1:53 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<rapid:override name="description">
    <meta name="description" content="${category.categoryName}"/>
</rapid:override>
<rapid:override name="keywords">
    <meta name="keywords" content="${category.categoryName}"/>
</rapid:override>
<rapid:override name="title">
    <title>${category.categoryName}</title>
</rapid:override>

<!--BreadCrumb Start-->
<rapid:override name="breadcrumb">
    <nav class="breadcrumb">
        <a class="crumbs" href="/">
            <i class="fa fa-home"></i>Home
        </a>
        <i class="fa fa-angle-right"></i>
        <c:choose>
            <c:when test="${tag!=null}">
                <a href="/tag/${tag.tagId}">${tag.tagName}</a>
                <i class="fa fa-angle-right"></i>Article
            </c:when>
            <c:otherwise>
                There is no tag
            </c:otherwise>
        </c:choose>
    </nav>
</rapid:override>
<!--BreadCrumb End-->

<rapid:override name="left">
    <!--Blog Main Left Article Start-->
    <div id="primary" class="content-area">
        <main id="main" class="site-main">
            <c:choose>
                <c:when test="${pageInfo.list.size()!=0}">
                    <!--Article List-->
                    <c:forEach items="${pageInfo.list}" var="a">
                        <article class="post">
                            <figure class="thumbnail">
                                <a href="/article/${a.articleId}">
                                    <img width="280" height="210" src="${a.articleThumbnail}" class="attachment-content size-content wp-post-image" alt="${a.articleTitle}">
                                </a>
                                <span class="cat">
                                    <a href="/category/${a.categoryList[0].categoryId}">${a.categoryList[0].categoryName}</a>
                                </span>
                            </figure>

                            <header class="entry-header">
                                <h2 class="entry-title">
                                    <a href="/article/${a.articleId}" rel="bookmark">
                                        ${a.articleTitle}
                                    </a>
                                </h2>
                            </header><!--.entry-header-->

                            <div class="entry-content">
                                <div class="archive-content">
                                    ${a.articleSummary}...
                                </div>
                                <span class="title-1"></span>
                                <span class="new-icon">
                                    <c:choose>
                                        <c:when test="${a.articleStatus == 2}">
                                            <i class="fa fa-bookmark-o"></i>
                                        </c:when>
                                        <c:otherwise>
                                            <jsp:useBean id="nowDate" class="java.util.Date"/>
                                            <c:set var="interval" value="${nowDate.time - a.articleCreateTime.time}"/>
                                            <fmt:formatNumber value="${interval/1000/60/60/24}" pattern="#0" var="days"/>
                                            <c:if test="${days <= 7}">NEW</c:if>
                                        </c:otherwise>
                                    </c:choose>
                                </span>
                                <span class="entry-meta">
                                    <span class="date">
                                        <fmt:formatDate value="${a.articleCreateTime}" pattern="yyyyYearMMMonthddDay"/>&nbsp;&nbsp;
                                    </span>
                                    <span class="views">
                                        <i class="fa fa-eye"></i>
                                        ${a.articleViewCount} views
                                    </span>
                                    <span class="comment">&nbsp;&nbsp;
                                        <a href="/article/${a.articleId}#comments" rel="external nofollow">
                                            <i class="fa fa-comment-o"></i>
                                            <c:choose>
                                                <c:when test="${a.articleCommentCount == 0}">
                                                    Submit Comment
                                                </c:when>
                                                <c:otherwise>
                                                    ${a.articleCommentCount}
                                                </c:otherwise>
                                            </c:choose>
                                        </a>
                                    </span>
                                </span>
                                <div class="clear"></div>
                            </div><!--.entry-content-->
                            <span class="entry-more">
                                <a href="/article/${a.articleId}" rel="bookmark">Real All</a>
                            </span>
                        </article>
                    </c:forEach>
                    <!--Article List End-->
                </c:when>
            </c:choose>
        </main>
        <%@include file="../Public/part/paging.jsp"%>

    </div>
    <!--Blog Main Left Article End-->
</rapid:override>

<%@include file="../Public/framework.jsp"%>
<%--<html>--%>
<%--<head>--%>
<%--    <title>Title</title>--%>
<%--</head>--%>
<%--<body>--%>

<%--</body>--%>
<%--</html>--%>
